package com.sky.service.impl;

import com.sky.entity.DishFlavor;
import com.sky.mapper.DishFlavorMapper;
import com.sky.service.DishFlavorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DishFlavorServiceImpl implements DishFlavorService {
    @Autowired
    private DishFlavorMapper dishFlavorMapper;
    @Override
    public void save(List<DishFlavor> flavors) {
            dishFlavorMapper.save(flavors);
    }

    @Override
    public List<DishFlavor> findByDishId(Long id) {

        List<DishFlavor>  list = dishFlavorMapper.findByDishId(id);
        return list;
    }

    @Override
    public void deleteByDishIds(List<Long> ids) {
        dishFlavorMapper.deleteByDishIds(ids);
    }

    @Override
    public void deleteByDishId(Long id) {
        dishFlavorMapper.deleteByDishId(id);
    }


}
